if ("serviceWorker" in navigator) {
  console.log("success");
  navigator.serviceWorker.register(
    "./sw.js",
    function () {
      console.log("register success");
    },
    function (err) {
      console.log(err);
    }
  );
}
